<center><h1>新規ユーザー登録</h1>
<font size="3" face="ＭＳ ゴシック" color="red"><%= flash[:notice] %></font>
<%= form_for(@user) do |f| %>
  <% if @user.errors.any? %>
    <div id="error_explanation">
      <h2><%= pluralize(@user.errors.count, "error") %> prohibited this user from being saved:</h2>

      <ul>
      <% @user.errors.full_messages.each do |message| %>
        <li><%= message %></li>
      <% end %>
      </ul>
    </div>
  <% end %>
<strong>
  <div class="field">
    <%= f.label 'ユーザーID' %><br>
    <%= f.text_field :userid ,{:maxlength => 4}%>
  </div>
  <div class="field">
    <%= f.label 'ユーザー名' %><br>
    <%= f.text_field :username ,{:maxlength => 10} %>
  </div>
  <div class="field">
    <%= f.label 'パスワード' %><br>
    <%= f.text_field :password ,{:maxlength => 8}%>
  </div>
  <div class="field">
    <%= f.label '管理者権限' %><br>
    有り<%= f.radio_button :admin, '1', {:checked => true} %>
    無し<%= f.radio_button :admin, '0', {} %>

  </div>

  <div class="actions">
    <%= f.submit %>
  </div>
<% end %>
</strong>
<%= link_to '戻る', users_path %>
</center>